(bug 56184) Allow 3-way merge from arbitrary revisions
authorLiangent <liangent@gmail.com>
Fri, 25 Oct 2013 18:53:12 +0000 (18:53 +0000)
committerReedy <reedy@wikimedia.org>
Thu, 23 Jan 2014 22:45:56 +0000 (22:45 +0000)
Change-Id: Iaceecb26062266ccd9a1c63c126ff0d5471f7d97

includes/EditPage.php

index 7115eab..aeb9e50 100644 (file)
@@ -930,10 +930,6 @@ class EditPage {
                                $undo = $wgRequest->getInt( 'undo' );
 
                                if ( $undo > 0 && $undoafter > 0 ) {
-                                       if ( $undo < $undoafter ) {
-                                               # If they got undoafter and undo round the wrong way, switch them
-                                               list( $undo, $undoafter ) = array( $undoafter, $undo );
-                                       }
 
                                        $undorev = Revision::newFromId( $undo );
                                        $oldrev = Revision::newFromId( $undoafter );
@@ -942,8 +938,6 @@ class EditPage {
                                        # the revisions exist and they were not deleted.
                                        # Otherwise, $content will be left as-is.
                                        if ( !is_null( $undorev ) && !is_null( $oldrev ) &&
-                                               $undorev->getPage() == $oldrev->getPage() &&
-                                               $undorev->getPage() == $this->mTitle->getArticleID() &&
                                                !$undorev->isDeleted( Revision::DELETED_TEXT ) &&
                                                !$oldrev->isDeleted( Revision::DELETED_TEXT ) ) {